<template>
  <div class="catagoryDetail">
    <van-grid v-if="value.length" :column-num="3">
        <van-grid-item v-for="item in value" :key="item.sort"
        :icon="item.image.external_url"
        :text="item.name"
        @click="$router.push(`/list?search=${item.name}`)"
        />
    </van-grid>
  </div>
</template>

<script>

export default {
  props: {
    value: {
      type: Array,
      default: () => {
        return []
      }
    }
  // },
  // data () {
  //   return {
  //     cataDetail: []
  //   }
  // },
  // created () {
  //   // const index = this.value[2]
  //   // const { children } = this.value[1][index]
  //   this.cataDetail = this.value
  //   // console.log(this.cataDetail)
  // }
  }
}
</script>

<style scoped>
  .catagoryDetail{
    height: 525px;
    width: 270px;
    overflow:auto;
  }
  ::v-deep .van-icon__image{
    width: 70px;
    height: 70px;
  }
</style>
